Fix order-of-evaluation issue in xc_domain_dumpcore. The intent is
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 9 Mar 2006 10:16:46 +0000 (11:16 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 9 Mar 2006 10:16:46 +0000 (11:16 +0100)
to move blocks of memory 4096 pages at a time, and a buffer is
allocated for this.  Unfortunately, the #define is without
parentheses and %/* are the same order and evaluated left to right.
Result: very big buffer being used 4 pages at a time.

Signed-off-by: Ben Thomas (bthomas@virtualiron.com)
tools/libxc/xc_core.c

index 34c6d16a8cb848e2c577eca7a8fedeea31bc21de..6e403f0e9949ca43e7e96575bc2f9f26e451bd48 100644 (file)
@@ -6,7 +6,7 @@
 #include <zlib.h>
 
 /* number of pages to write at a time */
-#define DUMP_INCREMENT 4 * 1024
+#define DUMP_INCREMENT (4 * 1024)
 #define round_pgup(_p)    (((_p)+(PAGE_SIZE-1))&PAGE_MASK)
 
 static int